package ecmnext.business.event;

/***************************************************************/
/*                     SOFTWARE SECTION                        */
/***************************************************************/
/*
 * <p>Name: ECMNext</p>
 * <p>Description: Simulation of the platform of trading Software</p>
 * <p>Licence: General Public License</p>
 * <p>Organisation: EC Marseille</p>
 * <p>Persons involved in the project : groupe Plateforme de Trading</p>
 * <p>Current version: 1.0</p>
 */

/***************************************************************/
/*             PortfolioEvent CLASS SECTION                    */
/***************************************************************/

/**
 * <p>Title: PortfolioEvent</p>
 * <p>Description :</p>
 * @author Xuewen YANG ET Antoine COUDERC
 * @version 1.0
 */

public class PortfolioEvent {

  public final static int CASH_UPDATED = 0;
  public final static int ASSET_UPDATED = 1;
  public final static int ASSET_ADDED = 2;
  public final static int ASSET_REMOVED = 3;
  public final static int ALL_UPDATED = 4;


  private String assetUpdated;
  private int event;

  public PortfolioEvent(String assetUpdated, int event) {
    this.assetUpdated = assetUpdated;
    this.event = event;
  }

  public PortfolioEvent(int event) {
    this(null,event);
  }

  /**
   * return the name of the assetupdated only if the efent is ASSET_UPDATED
   * send back null otherwise.
   * @return String
   */
  public String getAssetUpdated() {
    return this.assetUpdated;
  }

  public int getEvent() {
    return this.event;
  }

}
